package book.Test;

import java.sql.Connection;
import java.sql.SQLException;

import org.junit.Test;

import book.dao.BaseDao;
import book.dao.UserDao;
import book.dao.impl.UserDaoImpl;
import book.entity.User;
import book.utils.JdbcUtils;

public class TestUserDao {
	
	private UserDao userDao = new UserDaoImpl();
	
	
	@Test
     public void getUser() throws Exception {
    	 Connection connection = JdbcUtils.getConnection();
    	 String sql = "SELECT user_id as userId,email,password FROM user WHERE user_id=?";

    	 User user = userDao.getUser(connection, sql, User.class, 1000);
    	 
    	 System.out.println(user);
    	 
     }
	

	

}
